package com.fowo.api.model.cost.supplement.form;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.validator.EnumsString;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 成本补录单 导入导出辅助模型 */
@Getter
@Setter
public class CostSupplementFormExcelPo {

  @NotBlank(message = "补录单号不能为空")
  @Size(max = 50, message = "补录单号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*补录单号")
  private String orderNumber;

  @NotBlank(message = "类型不能为空")
  @EnumsString(
    value = { "入库成本" },
    message = "类型的可用值为 “入库成本” 其中之一"
  )
  @Size(max = 50, message = "类型长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*类型")
  private String type;

  @NotNull(message = "仓库不能为空")
  @Size(max = 50, message = "仓库长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*仓库")
  private String warehouseName;

  @ExcelIgnore
  @ExcelProperty(value = "*仓库")
  private Long warehouse;

  @Size(max = 50, message = "备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "备注")
  private String remark;

  @EnumsString(
    value = { "待审批", "已处理", "已驳回" },
    message = "单据状态的可用值为 “待审批”, “已处理”, “已驳回” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "单据状态")
  private String documentStatus;
}
